<?php

define( "DS",		DIRECTORY_SEPARATOR,			true );
define( "ISEP",		getenv('COMSPEC')? ';' : ':',	true );
define( "_ROOT",	ROOT . DS,						true );

define( "_ENGINE",	_ROOT . "engine" . DS,			true );
define( "_LIBRARY",	_ENGINE . "library" . DS,		true );
define( "_CLASS",	_ENGINE . "class" . DS,			true );
define( "_DRIVERS", _ENGINE . "drivers" . DS,		true );
define( "_ASSETS",	_ENGINE . "assets" . DS,		true );
define( "_WIDGETS",	_ENGINE . 'widgets' . DS,		true );

ini_set( 'include_path', _ENGINE . ISEP . _ROOT.DS . ISEP . ini_get('include_path') );

define( "ENGINE",	"Phenol",		true );
define( "VERSION",	"0.1.1.11",		true );
define( "AUTHOR",	"LestaDz",		true );
define( "EMAIL",	"lestad@bk.ru",	true );

$_locale		= null;
$_page			= null;
$_baseConfig	= null;

assert_options(	ASSERT_ACTIVE,		1);
assert_options(	ASSERT_WARNING,		0);
assert_options(	ASSERT_QUIET_EVAL,	1);

if ( defined('ADMIN') )
{
	define( "_AROOT",	AROOT . DS,						true );

	define( "_AENGINE",	_AROOT . "engine" . DS,			true );
	define( "_RPUBLIC",	_ROOT . "public" . DS,			true );
	define( "_PUBLIC",	_AROOT . "public" . DS,			true );
	define( "_TMPL",	_PUBLIC . "templates" . DS,		true );
	define( "_RTMPL",	_RPUBLIC . "templates" . DS,	true );
	define( "_LOCAL",	_PUBLIC . "local" . DS,			true );
	define( "_RLOCAL",	_RPUBLIC . "local" . DS,		true );
	define( "_MODULES",	_AROOT . "modules" . DS,		true );
	define( "_LOGFILE",	_AENGINE . "base.log",			true );
	define( "_ALIBRARY",_AENGINE . "library" . DS,		true );
	define( "_ACLASS",	_AENGINE . "class" . DS,		true );
	
	ini_set( 'include_path', _AENGINE . ";" . ini_get('include_path') );
}
else
{
	define( "_PUBLIC",	_ROOT . "public" . DS,			true );
	define( "_TMPL",	_PUBLIC . "templates" . DS,		true );
	define( "_LOCAL",	_PUBLIC . "local" . DS,			true );
	define( "_MODULES",	_ROOT . "modules" . DS,		true );
	define( "_LOGFILE",	_ENGINE . "base.log",			true );
}